package com.ruoyi.lock.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 建筑架构对象 a_buiding
 * 
 * @author ruoyi
 * @date 2024-08-01
 */
public class ABuiding extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门id */
    private Long deptId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String deptName;

    /** 父部门ID */
    private Long parentId;
    private Integer orderNum;

    /** 祖级列表 */
    private String ancestors;

    /** 负责人 */
    @Excel(name = "负责人")
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 部门状态（0正常 1停用） */
    @Excel(name = "部门状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 类型   2：校区 3：楼宇  4：楼层 */
    @Excel(name = "类型   2：校区 3：楼宇  4：楼层")
    private Long type;

    /** 逻辑删除 0、未删除  1、已删除   */
    private Long deleteFlg;

    /** 是否生效：  0、已生效  1、待生效 */
    @Excel(name = "是否生效：  0、已生效  1、待生效")
    private Long isValid;

    /** 楼栋码 */
    @Excel(name = "楼栋码")
    private Long buildingCode;

    /** 总楼层数 */
    @Excel(name = "总楼层数")
    private Long floorNum;

    /** 楼层 */
    @Excel(name = "楼层")
    private Long floor;
    private Long deptIdNew;

    public Long getDeptIdNew() {
        return deptIdNew;
    }

    public void setDeptIdNew(Long deptIdNew) {
        this.deptIdNew = deptIdNew;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public String getAncestors()
    {
        return ancestors;
    }

    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    /** 子部门 */
    private List<ABuiding> children = new ArrayList<ABuiding>();
    /** 子部门 */
    public List<ABuiding> getChildren()
    {
        return children;
    }

    public void setChildren(List<ABuiding> children)
    {
        this.children = children;
    }



    @NotNull(message = "显示顺序不能为空")
    public Integer getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setDeptName(String deptName) 
    {
        this.deptName = deptName;
    }

    public String getDeptName() 
    {
        return deptName;
    }
    public void setLeader(String leader) 
    {
        this.leader = leader;
    }

    public String getLeader() 
    {
        return leader;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setDeleteFlg(Long deleteFlg) 
    {
        this.deleteFlg = deleteFlg;
    }

    public Long getDeleteFlg() 
    {
        return deleteFlg;
    }
    public void setIsValid(Long isValid) 
    {
        this.isValid = isValid;
    }

    public Long getIsValid() 
    {
        return isValid;
    }
    public void setBuildingCode(Long buildingCode) 
    {
        this.buildingCode = buildingCode;
    }

    public Long getBuildingCode() 
    {
        return buildingCode;
    }
    public void setFloorNum(Long floorNum) 
    {
        this.floorNum = floorNum;
    }

    public Long getFloorNum() 
    {
        return floorNum;
    }
    public void setFloor(Long floor) 
    {
        this.floor = floor;
    }

    public Long getFloor() 
    {
        return floor;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("type", getType())
            .append("deleteFlg", getDeleteFlg())
            .append("isValid", getIsValid())
            .append("buildingCode", getBuildingCode())
            .append("floorNum", getFloorNum())
            .append("floor", getFloor())
            .toString();
    }
}
